<template>
	<view class="banner" v-if="list.length > 0">
		<u-swiper :list="list" :height="height" :keyName="keyName" :indicator="indicator" :radius="radius"
			:circular="circular" @click="swiperClick"></u-swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		props: {
			// 轮播图列表
			list: {
				type: Array,
				default: (() => {
					return [];
				})
			},
			// 高度
			height: {
				type: String,
				default: '500rpx'
			},
			// 数组中指定对象的目标属性名
			keyName: {
				type: String,
				default: 'image'
			},
			// 是否显示指示器
			indicator: {
				type: Boolean,
				default: true
			},
			// 圆角
			radius: {
				type: String,
				default: '0'
			},
			circular: {
				type: Boolean,
				default: false
			}
		},
		methods: {
			swiperClick(index) {
				this.$emit('swiperClick', index)
			},
		}
	}
</script>

<style>
</style>